package com.raitcon.hibernate.bean;
// Generated 09/08/2014 12:26:17 PM by Hibernate Tools 3.2.1.GA


import com.raitcon.hibernate.bean.*;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * DetalleLibreta generated by hbm2java
 */
@Entity
@Table(name="detalle_libreta"
    ,schema="public"
)
public class DetalleLibreta  implements java.io.Serializable {


     private int idDetalleLibreta;
     private Libreta libreta;
     private Asignatura asignatura;

    public DetalleLibreta() {
    }

    public DetalleLibreta(int idDetalleLibreta, Libreta libreta, Asignatura asignatura) {
       this.idDetalleLibreta = idDetalleLibreta;
       this.libreta = libreta;
       this.asignatura = asignatura;
    }
    @SequenceGenerator(allocationSize=1, initialValue=1, sequenceName="secuencia_id_detalle_libreta", name="secuencia_id_detalle_libreta")
    @GeneratedValue(generator="secuencia_id_detalle_libreta", strategy=GenerationType.SEQUENCE)
    @Id 
    
    @Column(name="id_detalle_libreta", unique=true, nullable=false)
    public int getIdDetalleLibreta() {
        return this.idDetalleLibreta;
    }
    
    public void setIdDetalleLibreta(int idDetalleLibreta) {
        this.idDetalleLibreta = idDetalleLibreta;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="id_libreta", nullable=false)
    public Libreta getLibreta() {
        return this.libreta;
    }
    
    public void setLibreta(Libreta libreta) {
        this.libreta = libreta;
    }
@ManyToOne(fetch=FetchType.EAGER)
    @JoinColumn(name="id_asignatura", nullable=false)
    public Asignatura getAsignatura() {
        return this.asignatura;
    }
    
    public void setAsignatura(Asignatura asignatura) {
        this.asignatura = asignatura;
    }




}


